package com.wgchao.identityrightsmanagement.infrastructure.jpa.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.util.Date;

/**
 * @ClassName: SysPermissionOffice
 * @author: wgchao
 * @createTime: 2020/6/28 5:34 PM
 * @Description: TODO
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "sys_permission_office", uniqueConstraints = @UniqueConstraint(columnNames = {"department_code","office_code","menu_mark"}))
@Entity
public class SysPermissionOffice {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id" )
    private Long id;

    @Column(name = "department_code", length = 50)
    private String departmentCode;

    @Column(name = "office_code", length = 50)
    private String officeCode;

    @Column(name = "menu_mark", length = 50)
    private String menuMark;

    @Column(name = "pro_mark", length = 50)
    private String proMark;

    @Column(name = "creator", length = 20)
    private String creator;

    @Column(name = "create_time")
    private Date createTime;

}
